package com.itheima.callable;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class Demo1 {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        MyCallAble myCallAble=new MyCallAble();
        FutureTask<String> ft=new FutureTask<>(myCallAble);
        Thread thread=new Thread(ft);
        thread.start();
        System.out.println(ft.get());


    }
}
